import request from '@/utils/request'

//根据小区id查询所有楼栋,用于下拉框
export function getBulidingMapList(id) {
  return request({
    url: '/system/building/bulidingMapList/'+id,
    method: 'get',
    //params: query
  })
}

//加密用户信息,用于前端生成二维码
export function getEncodeQrCodeInfo(id) {
  return request({
    url: '/system/household/encodeUrl/'+id,
    method: 'get',
    //params: query
  })
}


// 查询住户列表
export function listHousehold(query) {
  return request({
    url: '/system/household/list',
    method: 'get',
    params: query
  })
}


// 查询住户详细
export function getHousehold(id) {
  return request({
    url: '/system/household/' + id,
    method: 'get'
  })
}

// 新增住户
export function addHousehold(data) {
  return request({
    url: '/system/household',
    method: 'post',
    data: data
  })
}

// 修改住户
export function updateHousehold(data) {
  return request({
    url: '/system/household',
    method: 'put',
    data: data
  })
}

// 删除住户
export function delHousehold(id) {
  return request({
    url: '/system/household/' + id,
    method: 'delete'
  })
}
